package com.szpxt.service;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Component;

import com.szpxt.model.Organization;

@Component
public class OrganizationService extends HibernateDaoSupport {

	public List<Organization> getAll() {
		DetachedCriteria criteria = DetachedCriteria.forClass(Organization.class);
		return (List<Organization>)getHibernateTemplate().findByCriteria(criteria);
	}
	
}
